package _8_inherit;

public class Animal 
{
	private String name;
	private int age;
	
	public String getName()
	{
		return name;
	}
	public void setName(String name)
	{
		this.name = name;
	}
	public int getAge()
	{
		return age;
	}
	public void setAge(int age)
	{
		this.age = age;
	}
	public void show()
	{
		System.out.println("姓名：" + name + "，年龄；" + age + "岁");
	}
	public void shower()
	{
		System.out.println(name + "洗澡中...");
	}
	//方法的重写（见Cat,Dog）
	public void eat()
	{
		System.out.println("动物在吃饭");
	}
}
